/**
 * Free software.
 */

package org.nanhill.support.hibernate;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

/**
 * @author alin [xalinx at gmail dot com]
 * @date 2006-11-10
 */
public class HibernateSupport {

	private SessionFactory sessionFactory;

	protected Session getSession() {
		return sessionFactory.getCurrentSession();
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	protected SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public HibernateSupport() {
	}

	public HibernateSupport(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

}
